package aos;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;

public class TestClient {
public static void main(String[] args) {
	try {
		Socket s = new Socket("localhost",5060);
		
		PrintWriter w = new PrintWriter(s.getOutputStream(),true);
		BufferedReader r = new BufferedReader(new InputStreamReader(s.getInputStream()));
		
		w.println("1:3:wakawaka.txt:Hello, WakaWaka");
		
		String l = null;
		while((l=r.readLine()) != null){
			System.out.println(l);
		}
	} catch (UnknownHostException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	} catch (IOException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}
}
